let m = 'abc';
function show() {
    for (let n = 0, j = 1; n < j; n++, j++) {
        for (let i = 0; i < m.length; i++) {
            let str = {};
            str = m[i];
            document.write(str);
        }
        if (j > 2) {
            return;
        }
    }
}
show();
